
screenNum=0;
res=[640 480];
clrdepth=32;
[wPtr, rect]=Screen('OpenWindow', screenNum, 0, [0 0 res(1) res(2)], clrdepth);

black=BlackIndex(wPtr);
white=WhiteIndex(wPtr);
Screen('FillRect', wPtr, white);

refresh = Screen('GetFlipInterval', wPtr);
vbl = Screen('Flip', wPtr);

%tic
for i=1:4
    
    %2 refresh cycles
    if mod(i, 2) == 0
        S='Give me the money';
        DrawFormattedText(wPtr, S,'center','center', [255 0 0]);
	vbl = Screen('Flip', wPtr, vbl + (25 - 0.4) * refresh);
        
    else
        %S=randChar();
        %DrawFormattedText(wPtr, S,'center','center', [0 0 0]);
	vbl = Screen('Flip', wPtr, vbl+);


    end;
end;

%toffset = Screen('Flip', wPtr, vbl + (2 - 0.5) * refresh);
%toc


Screen('CloseAll');
ShowCursor;



    
